package com.gakj.truck.third.api.mapper;

import com.gakj.truck.third.core.annotation.MyBatisMapper;
import com.gakj.truck.third.core.domain.UserDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by gc on 2016/5/8.
 */
@MyBatisMapper
public interface UserDtoMapper {

    List<UserDto> getAll();

    Long save(UserDto userDto);

    void delete(@Param(value = "id") Long id);

    UserDto getById(@Param(value = "id") Long id);

    UserDto getUserByLoginNameOrMobile(@Param(value = "loginName") String loginName,
                                       @Param(value = "mobile") String mobile,
                                       @Param(value = "type") String type);

    List<UserDto> findUserByMobile(@Param(value = "mobile") String mobile);

    void update(UserDto userDto);
}
